<?php
/**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE_AFL.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magentocommerce.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magentocommerce.com for more information.
 *
 * @category    design
 * @package     base_default
 * @copyright   Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
 * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */
?>
<div class="navigation">
    <ul>
        <li><a href="<?php echo $this->getUrl("about-us") ?>"><?php echo $this->__("About Us") ?></a></li>
        <li><a class="current" href="<?php echo $this->getUrl("contact-us") ?>"><?php echo $this->__("Contact Us") ?> </a></li>
    </ul>
</div>
<div id="messages_product_view"><?php echo $this->getMessagesBlock()->getGroupedHtml() ?></div>
<!-- Contact form page -->
<p><?php echo $this->__('You can send a message to us using the form below.') ?></p>
<?php $home_url = Mage::helper('core/url')->getHomeUrl(); ?>
<form class="jNice" action="<?php echo $this->getUrl("contacts/index/post") ?>" id="contactForm" method="post">
    <div class="box-contact">
        <fieldset><label><?php echo $this->__('Username') ?></label>
             <input name="name" id="name" title="<?php echo Mage::helper('contacts')->__('Name') ?>" value="<?php echo $this->htmlEscape($this->helper('contacts')->getUserName()) ?>" class="required-entry" type="text" />
            </fieldset>  
        <fieldset><label><?php echo $this->__('Title') ?><span class="require">*</span></label>
            <select name="title" class="title">
                <option value="<?php echo $this->__('Mr') ?>"><?php echo $this->__('Mr') ?></option>
                <option value="<?php echo $this->__('Miss') ?>"><?php echo $this->__('Miss') ?></option>
                <option value="<?php echo $this->__('Ms') ?>"><?php echo $this->__('Ms') ?></option>
                <option value="<?php echo $this->__('Dr') ?>"><?php echo $this->__('Dr') ?></option>
            </select>
        </fieldset>
        <fieldset><label><?php echo $this->__('First Name') ?><span class="require">*</span></label><input name="first_name" class="required-entry" type="text"/></fieldset>
        <fieldset><label><?php echo $this->__('Last Name') ?><span class="require">*</span></label><input name="last_name" class="required-entry" type="text"/></fieldset>
        <fieldset><label><?php echo $this->__('Company') ?></label><input type="text" name="company" class="required-entry"/></fieldset>
        <fieldset><label><?php echo $this->__('Address') ?><span class="require">*</span></label><input name="address" class="required-entry" type="text"/></fieldset>
        <fieldset><label><?php echo $this->__('Address (line 2)') ?></label><input type="text" name="adress_2"/></fieldset>
        <fieldset><label><?php echo $this->__('City') ?><span class="require">*</span></label><input name="city" class="required-entry" type="text"/></fieldset>
        <fieldset><label><?php echo $this->__('State') ?><span class="require">*</span></label>
            <select id="region_id" class="required-entry" name="region_id" title="<?php echo $this->__('State/Province') ?>" class="validate-select" style="">
                <option value=""><?php echo $this->__('Please select region, state or province') ?></option>
            </select>
            <script type="text/javascript">
            //<![CDATA[
                $('#region_id').setAttribute('defaultValue', "<?php //echo $this->getFormData()->getRegionId() ?>");
            //]]>
            </script>
            <input type="text" id="region" name="region" class="required-entry" value="" title="<?php echo $this->__('State/Province') ?>" style="display:none;" />
        </fieldset>
<!--        <fieldset><label>Country<span class="require">*</span></label>
            <select class="country">
                <option>united States</option>
            </select>
        </fieldset>-->
        <fieldset>
            <label for="country" class="required"><?php echo $this->__('Country') ?><span>*</span></label>
            <?php $_countries = Mage::getResourceModel('directory/country_collection')
                    ->loadData()
                    ->toOptionArray(false) ?>
            <?php if (count($_countries) > 0): ?>
                <select name="country" class="required-entry" id="country">
                    <?php foreach($_countries as $_country): ?>
                            <option selected value="<?php echo $_country['value'] ?>">
                                <?php echo $_country['label'] ?>
                            </option>
                   <?php endforeach; ?>
                </select>
            <?php endif; ?>
        </fieldset>
        <fieldset>
            <label for="zip" class="required"><?php echo $this->__('Zip/Postal Code') ?><span>*</span></label>
            <input type="text" name="postcode" value="" title="<?php echo $this->__('Zip/Postal Code') ?>" id="zip" class="zipcode validate-zip-international <?php echo $this->helper('customer/address')->getAttributeValidationClass('postcode') ?>" />
            <input type="hidden" name="address_id" value="" />
            <input type="hidden" name="id" value="" />
        </fieldset>
        <fieldset><label><?php echo $this->__('Phone') ?><span class="require">*</span></label>
            <input name="telephone" id="telephone" title="<?php echo Mage::helper('contacts')->__('Telephone') ?>" value="" class="required-entry" type="text" />
        </fieldset>
        <fieldset><label><?php echo $this->__('Fax') ?></label>
            <input name="fax" id="telephone" title="<?php echo $this->__('Fax') ?>" value="" class="" type="text" />
        </fieldset>
        <fieldset><label><?php echo $this->__('E-Mail') ?><span class="require">*</span></label>
            <input name="email" id="email" title="<?php echo Mage::helper('contacts')->__('Email') ?>" value="<?php echo $this->htmlEscape($this->helper('contacts')->getUserEmail()) ?>" class="required-entry validate-email" type="text" />
        </fieldset>
        <fieldset><label><?php echo $this->__('Website') ?></label><input name="website" type="text"/></fieldset>
        <fieldset><label><?php echo $this->__('Department') ?><span class="require">*</span></label>
            <input name="department" id="department" title="<?php echo $this->__('Fax') ?>" value="" class="required-entry" type="text" />
        </fieldset>
        <fieldset><label><?php echo $this->__('Subject') ?><span class="require">*</span></label><input class="required-entry" value="" name="subject" type="text"/></fieldset>
        <fieldset><label><?php echo $this->__('Message') ?><span class="require">*</span></label>
            <textarea name="comment" id="comment" title="<?php echo Mage::helper('contacts')->__('Comment') ?>" class="required-entry" cols="50" rows="5"></textarea>
        </fieldset>
        <fieldset>
<!--            <input type="submit" value="Submit" class="submit"/>-->
<!--            <p class="required"><?php echo Mage::helper('contacts')->__('* Required Fields') ?></p>-->
            <input type="text" name="hideit" id="hideit" value="" style="display:none !important;" />
            <button type="submit" title="<?php echo Mage::helper('contacts')->__('Submit') ?>" class="submit"><span><span><?php echo Mage::helper('contacts')->__('Submit') ?></span></span></button>
        </fieldset>                     	
    </div>
</form>
<script type="text/javascript">
//<![CDATA[
    var contactForm = new VarienForm('contactForm', true);
    new RegionUpdater('country', 'region', 'region_id', <?php echo $this->helper('directory')->getRegionJson() ?>, undefined, 'zip');
//]]>
</script>